import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
import UserList from '../views/UserList.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/user/list',
  },
  {
    path: '/user/list',
    name: 'UserList',
    component: UserList,
    meta: { title: '用户列表' },
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
